# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Mintsuki <mintsuki@protonmail.com>

pkgname=limine
pkgver=5.20231124.0
pkgrel=1
pkgdesc="An advanced, portable, multiprotocol bootloader"
arch=('loong64' 'x86_64')
url="https://limine-bootloader.org/"
license=('BSD')
depends=('glibc')
makedepends=('nasm' 'mtools' 'llvm' 'lld' 'clang')
source=("https://github.com/limine-bootloader/limine/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
sha256sums=('e212311b3aa1981b1ab380cf4ded6384585d4895003fe2ecde20503d24d2c567')

build() {
	cd "${pkgname}-${pkgver}"
	./configure --prefix=/usr --enable-all TOOLCHAIN_FOR_TARGET=llvm
	make
}

package() {
	cd "${pkgname}-${pkgver}"
  	make DESTDIR="${pkgdir}" install
	install -Dm 644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
